#ifndef _SPECTRALISOPARAMQUADSOMMER_H_
#define _SPECTRALISOPARAMQUADSOMMER_H_ 

#include <Element.d/Sommerfeld.d/SommerElement.h>

class SpectralIsoParamQuadSommer: public SommerElement {

	int *nn;
        int order;
public:
	SpectralIsoParamQuadSommer(int, int*, Element *_el = 0, int eType = 10);

        int numNodes() {return order*order;}
        int getNode(int nd) { return nn[nd]; }
	int* getNodes() { return nn; }
        int numDofs() { return order*order; }
        int numSolidDofs() { return 3*order*order; }
        int numWetDofs() { return 4*order*order; }
        int dim() { return 3; }
        int* dofs(DofSetArray &, int *p=0);
        virtual SpectralIsoParamQuadSommer* clone();

        int* wetDofs(DofSetArray &, int *p=0);
        int* solidDofs(DofSetArray &, int *p=0);

        void flipNormal();

        void neumVector(CoordSet&,ComplexVector&,
                                double,double,double,double);
        void neumVectorDeriv(CoordSet& cs, ComplexVector& cv, double k,
                                    double dx, double dy, double dz, int n);

        FullSquareMatrix sommerMatrix(CoordSet&, double *);
        //GenStackFSFullMatrix<double> wetInterfaceMatrix(CoordSet &cs,
        //                                                double *d);
        virtual void ffp(CoordSet &cs, int numFFP, double *dirFFP,
                         complex<double> *sol, complex<double> *ffpv);

        FullSquareMatrixC sommer2Matrix(CoordSet&, complex<double> *);
        FullSquareMatrix turkelMatrix(CoordSet&, double *);

        ComplexD ffpCoef(double k) { return ComplexD(0.25/M_PI, 0.0); }

	void getNormal(CoordSet&, double [3]);

        void markDofs(DofSetArray &);
};
#endif
